#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>

int main(){
    FILE *fp;
    time_t curtime;
    while (1)
    {
        if((fp = fopen("hello.log", "a")) >= 0){
            time(&curtime);
            fprintf(fp,"Hello, this is another process for test, the time is %s\n", ctime(&curtime));
            fclose(fp);
        }
        sleep(1);
    }
    return 0;
}